﻿<%@ Page Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true" CodeBehind="ImportCFI.aspx.cs" Inherits="PreContractWeb.Task.ImportCFI" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="Microsoft.Web.UI.WebControls" TagPrefix="iewc" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <Triggers>
        <asp:PostBackTrigger ControlID="btnUpload" />
    </Triggers>
    <ContentTemplate>
        <div style="text-align: center">
            <table width="95%" border="0" cellpadding="0" cellspacing="0">    
                <tr>
                    <td width="100%" height="100%" valign="middle" align="center">
                    <br />
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td class="panel_header">
                                    <!--标题-->
                                    导入库存信息(Import CFI)
                                    <!--标题-->
                                </td>
                                <td width="5" rowspan="2" background="../Images/BG-Border-Right.png" valign="top">
                                    <img src="../Images/BG-Border-RT.png" border="0" alt="" />
                                </td>
                            </tr>
                            <tr>
                                <td class="panel_body">
                                    <!--Panel Body-->
                                    <table style="width: 100%">
                                        <tr>
                                            <td style="text-align: center;">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <table style="width: 100%; height: 100%">
                                                    <tr>
                                                        <td style="text-align: left; width: 65%">
                                                            <asp:FileUpload ID="uplFile" runat="server" Width="100%" /></td>
                                                        <td style="text-align: left; width: 15%">
                                                            <asp:Button ID="btnUpload" CssClass="bgButton" runat="server" Text="上传 (Upload)"
                                                                OnClick="btnUpload_Click" autovisible="true"  autoajax="true"/></td>
                                                        <td style="width: 20%">
                                                            <a href="../ExcelTemplate/CFITemplate.xls">模板下载(Template Download)</a></td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                    <!---->
                                </td>
                            </tr>
                            <tr>
                                <td height="5" background="../Images/BG-Border-Bottom.png" align="left">
                                    <img src="../Images/BG-Border-LB.png" border="0" /></td>
                                <td width="5" height="5" background="../Images/BG-Border-RB.png">
                                </td>
                            </tr>
                        </table>
                        <br />
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left">
                                    <iewc:TabStrip ID="tabDocument" runat="server" SepDefaultStyle="border-bottom:solid 1px bottom;"
                                        TabSelectedStyle="border:solid 1px #BBBBBB;border-bottom:none;padding-left:20px;padding-right:20px; background-image:url(../images/BG-Button-09.png);"
                                        TabHoverStyle="background-image: url(../images/BG-Button-09.png);" TabDefaultStyle="border:solid 1px BBBBBB;padding-left:20px;padding-right:20px;background-image: url(../images/BG-Button-08.png);"
                                        TargetID="mpTabDocumentPages" Height="25" AutoPostBack="false">
                                        <iewc:Tab Text="已更新的库存信息(CFI Updated)"></iewc:Tab>
                                        <iewc:TabSeparator />
                                        <iewc:Tab Text="没找到的预合同(Pre-Contracts Not Found)"></iewc:Tab>
                                        <iewc:TabSeparator DefaultStyle="width:100%;border-bottom-width:1px; border-bottom-color:#BBBBBB; border-bottom-style:solid;" />
                                    </iewc:TabStrip>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td width>
                                    <iewc:MultiPage ID="mpTabDocumentPages" runat="server" CssClass="mutil_panel_body"
                                        Width="100%">
                                        <iewc:PageView id="pvUploaded" runat="server">
                                            <!--Panel Body-->
                                            <asp:Panel ID="pnlgv" runat="server" HorizontalAlign="left" Width="100%" Height="100%">
                                            <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总数(Total):<span id="totalSpan_Updated" runat="server"></span></b>
                                                <div style="overflow-y: auto; overflow-x: auto; width: 760px" id="divGrid">
                                                    <asp:GridView ID="gvUpdated" runat="server" AutoGenerateColumns="False" Width="400px"
                                                        DataKeyNames="PreContractNo" OnRowDataBound="gvUpdated_RowDataBound">
                                                        <PagerSettings Visible="False"></PagerSettings>
                                                        <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                                        <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                                        <HeaderStyle CssClass="table_header"></HeaderStyle>
                                                        <EmptyDataTemplate>
                                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                                <tr>
                                                                    <td class="panel_header">
                                                                        <!--标题-->
                                                                        没有数据(No Data).
                                                                        <!--标题-->
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </EmptyDataTemplate>
                                                        <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                                        <Columns>
                                                            <asp:BoundField DataField="PreContractNo" HeaderText="预合同编号&lt;br/&gt;Pre-Contract No" SortExpression="PreContractNo"  HtmlEncode="false" />
                                                            <asp:BoundField DataField="BD" HeaderText="BD&lt;br/&gt;BD" SortExpression="BD" HtmlEncode="false" />
                                                            <asp:BoundField DataField="CFIPrice" HeaderText="库存金额&lt;br/&gt;CFI" SortExpression="CFI" HtmlEncode="false" DataFormatString="{0:N2}"/>
                                                        </Columns>
                                                    </asp:GridView>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                &nbsp;</td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </asp:Panel>
                                            <!---->
                                        </iewc:PageView>
                                        <iewc:PageView id="pvNotFound" runat="server">
                                            <!--Panel Body-->
                                            <asp:Panel ID="Panel2" runat="server" HorizontalAlign="left" Width="100%" Height="100%">
                                            <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总数(Total):<span id="totalSpan" runat="server"></span></b>
                                                <div style="overflow-y: auto; overflow-x: auto; width: 760px" id="divGridTwo">
                                                    <asp:GridView ID="gvNotFound" runat="server" AutoGenerateColumns="False" Width="400px"
                                                        DataKeyNames="PreContractNo"  OnRowDataBound="gvNotFound_RowDataBound">
                                                        <PagerSettings Visible="False"></PagerSettings>
                                                        <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                                        <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                                        <HeaderStyle CssClass="table_header"></HeaderStyle>
                                                        <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                                        <EmptyDataTemplate>
                                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                                <tr>
                                                                    <td class="panel_header">
                                                                        <!--标题-->
                                                                        没有数据(No Data).
                                                                        <!--标题-->
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </EmptyDataTemplate>
                                                        <Columns>
                                                            <asp:BoundField DataField="PreContractNo" HeaderText="预合同编号&lt;br/&gt;Pre-Contract No" SortExpression="PreContractNo"  HtmlEncode="false" />
                                                            <asp:BoundField DataField="BD" HeaderText="BD&lt;br/&gt;BD" SortExpression="BD" HtmlEncode="false" />
                                                            <asp:BoundField DataField="CFIPrice" HeaderText="库存金额&lt;br/&gt;CFI" SortExpression="CFI" HtmlEncode="false" DataFormatString="{0:N2}"/>
                                                        </Columns>
                                                    </asp:GridView>
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                &nbsp;</td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </asp:Panel>
                                            <!---->
                                        </iewc:PageView>
                                    </iewc:MultiPage>
                                </td>
                                <td width="5" background="../Images/BG-Border-Right.png" style="border-left-width: 1px;
                                    border-left-color: #BBBBBB; border-left-style: solid;" valign="top">
                                    <img src="../Images/BG-Border-RT.png" border="0" /></td>
                            </tr>
                            <tr>
                                <td height="5" background="../Images/BG-Border-Bottom.png" align="left">
                                    <img src="../Images/BG-Border-LB.png" border="0" /></td>
                                <td width="5" height="5" background="../Images/BG-Border-RB.png">
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>

<asp:UpdateProgress ID="UpdateProgress1" runat="server">
    <ProgressTemplate>
        <div style="position: absolute; left: 40%; top: 40%; overflow: hidden; background-color: white; filter: alpha(opacity=50); opacity: 0.5; -moz-opacity: 0.5;" id="AJAXProgress" >
            <table class="table_ajax">
                <tr>
                    <td style="width: 35px">
                        <img src="../Images/roller.gif" /></td>
                    <td style="width: 100px">
                        Processing...</td>
                </tr>
            </table>
        </div>
    </ProgressTemplate>
</asp:UpdateProgress>
<script>ResizeDivForScroll('divGrid');ResizeDivForScroll('divGridTwo');</script>
</asp:Content>